package com.chenl.provider.DEMOS.currLimit限流;

import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

@RestController
@RequestMapping("/limit")
//@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class TestController {
    @RateLimit(time = 1,count = 10,timeType = TimeUnit.MINUTES, bucketMaxTokens = 30, type = AnnotationType.RATE_LIMIT_INTERFACE)
    @RequestMapping(value = "/limitTest", method = RequestMethod.POST)
    public void limitTest(@RequestBody JSONObject jsonObject) {
        return;
    }
}


